<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .big{
            width: 200px;
            height: 200px;
            background-color: red;
        }
        .mid{
            width: 150px;
            height: 150px;
            background-color: green;
        }
        .small{
            width: 100px;
            height: 100px;
            background-color: skyblue;
        }
    </style>
    <script src="../vue.js"></script>
</head>
<body>
    <div id="app">
        <div class="big" @click="show('big')">
            <div class="mid" @click="show('mid')">
                <!-- stop阻止事件冒泡 -->
                <div class="small" @click.stop="show('small')"></div>
            </div>
        </div>
        <hr>
        <!-- prevent阻止事件默认行为 -->
        <a href="./1.vue.html" @click.prevent='add'>阻止事件默认行为</a>
        <!-- capture 捕获 将自己的事件提到最前面 -->
        <div class="big" @click.capture="show('big')">
            <div class="mid" @click="show('mid')">
                <!-- stop阻止事件冒泡 -->
                <div class="small" @click.stop="show('small')"></div>
            </div>
        </div>
    </div>
</body>
<script>
    let vm=new Vue({
        el:'#app',
        data:{

        },
        methods:{
            show(ht){
                console.log(ht);
            },
            add(){
                console.log(111);
            }
        }
    })
</script>
</html>